<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
<title>上传文件</title>
    <style>
        #main{margin:0 auto; width: 500px;}
        dl{clear: both; width: 100%;}
        dt{
            float: left;
            width: 100px;
            text-align: right;
        }
    </style>
    <script type="text/javascript">
//  	var dname=document.getElementsByTagName("div")[0];
//  	var co=dname.firstChild.cloneNode(true);
//  	function copy(){
//  	alert(co);
//  	var lastnode=document.getElementById("addBtn");
//  	document.getElementById("div").insertBefore(co,lastnode)
//  	}
         
      function copy(t){  
      	var uplo = document.getElementById("upload"); 
        var col=uplo.cloneNode(true);	   
	    var main=document.getElementById("main");
	    col.lastElementChild.firstElementChild.value="";
	   main.insertBefore(col,t.parentNode);
			}
    </script>

</head>

<body>
<div id="main">
    <dl id="upload">
        <dt>文件路径：</dt>
        <dd><input name="file" type="file" /></dd>
    </dl>
    <div id="addBtn"><input id="up" type="button" value="再上传一个文件" onclick="copy(this)" /></div>
</div>
</body>
</html>
